package com.sky.mapper.common;

import com.sky.pojo.SetmealDish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description SetmealDishMapper
 * @Author lijingtong
 * @Date 2024-09-27
 */
@Mapper
public interface SetmealDishMapper {

    /**
     * 通过套餐id查询数量
     * @param ids
     * @return
     */
    Integer selectCountByDishIds(@Param("ids") List<Long> ids);

    /**
     * 保存套餐和菜品的关联关系
     * @param setmealDishes
     */
    void insertBatch(List<SetmealDish> setmealDishes);

    /**
     * 根据套餐id删除套餐和菜品的关联关系
     * @param setMealId
     */
    void deleteBySetmealId(Long setMealId);
}
